// 初始化按钮状态

export default function updateButtonStatus() {
    const {orgVal, pageInfo, disabledAll, isInJob} = this.state;
    const flag = !parseInt(pageInfo.total) || disabledAll;
    this.props.button.setButtonDisabled({
        query: !orgVal.refpk || disabledAll,
        refresh: !orgVal.refpk || disabledAll,
        sort: flag || disabledAll,
        innertrans: !orgVal.refpk || isInJob || flag,
        crosstrans: !orgVal.refpk || disabledAll,
        batchedit: flag,
        assop: flag,
        viewctrt: flag,
        print: flag,
        output: flag,
        addblack: flag,
        dieproc: flag,
        import: !orgVal.refpk || disabledAll
    });
}
